package com.sg.controller.rbff;

import com.sg.service.biz.rbff.AlbumService;
import com.sg.dto.biz.rbff.req.*;
import com.sg.dto.biz.rbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Album", tags = {"Album"})
@RestController
// @RequestMapping("/rbff/album/")
public class AlbumController {

    @Autowired
    AlbumService albumService;

    /**
     * B8查询专辑详情
     * gen by moon at 11/13/2024, 8:51:07 PM
     */
    @PostMapping("/oms/dataassets/album/queryAlbumDetail")
    @ApiOperation(value = "B8查询专辑详情", response = OkrResult.class)
    public OkrResult<BffQueryAlbumDetailRespDto> queryAlbumDetail(@RequestBody(required = false) @Validated BffQueryAlbumDetailReqDto reqDTO) {
        return OkrResult.success(albumService.queryAlbumDetail(reqDTO));
    }

    /**
     * B8新增专辑
     * gen by moon at 11/13/2024, 9:11:48 PM
     */
    @PostMapping("/oms/dataassets/album/addAlbum")
    @ApiOperation(value = "B8新增专辑", response = OkrResult.class)
    public OkrResult<BffAddAlbumRespDto> addAlbum(@RequestBody(required = false) @Validated BffAddAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.addAlbum(reqDTO));
    }

    /**
     * B8修改专辑
     * gen by moon at 11/14/2024, 1:20:03 PM
     */
    @PostMapping("/oms/dataassets/album/updateAlbum")
    @ApiOperation(value = "B8修改专辑", response = OkrResult.class)
    public OkrResult<BffUpdateAlbumRespDto> updateAlbum(@RequestBody(required = false) @Validated BffUpdateAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.updateAlbum(reqDTO));
    }

    /**
     * B8删除专辑
     * gen by moon at 11/14/2024, 1:20:05 PM
     */
    @PostMapping("/oms/dataassets/album/deleteAlbum")
    @ApiOperation(value = "B8删除专辑", response = OkrResult.class)
    public OkrResult<BffDeleteAlbumRespDto> deleteAlbum(@RequestBody(required = false) @Validated BffDeleteAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.deleteAlbum(reqDTO));
    }

    /**
     * B8新增专辑分享记录表
     * gen by moon at 11/14/2024, 1:20:07 PM
     */
    @PostMapping("/oms/dataassets/album/addAlbumShareRec")
    @ApiOperation(value = "B8新增专辑分享记录表", response = OkrResult.class)
    public OkrResult<BffAddAlbumShareRecRespDto> addAlbumShareRec(@RequestBody(required = false) @Validated BffAddAlbumShareRecReqDto reqDTO) {
        return OkrResult.success(albumService.addAlbumShareRec(reqDTO));
    }

    /**
     * B8查询专辑列表
     * gen by moon at 11/14/2024, 1:20:10 PM
     */
    @PostMapping("/oms/dataassets/album/queryAlbumList")
    @ApiOperation(value = "B8查询专辑列表", response = OkrResult.class)
    public OkrResult<BffQueryAlbumListRespDto> queryAlbumList(@RequestBody(required = false) @Validated BffQueryAlbumListReqDto reqDTO) {
        return OkrResult.success(albumService.queryAlbumList(reqDTO));
    }

    /**
     * B8修改专辑文件别名
     * gen by moon at 11/14/2024, 1:20:12 PM
     */
    @PostMapping("/oms/dataassets/album/updateAlbumFileRelation")
    @ApiOperation(value = "B8修改专辑文件别名", response = OkrResult.class)
    public OkrResult<BffUpdateAlbumFileRelationRespDto> updateAlbumFileRelation(@RequestBody(required = false) @Validated BffUpdateAlbumFileRelationReqDto reqDTO) {
        return OkrResult.success(albumService.updateAlbumFileRelation(reqDTO));
    }

    /**
     * B8查询专辑文件关系详情
     * gen by moon at 11/14/2024, 1:20:14 PM
     */
    @PostMapping("/oms/dataassets/album/queryAlbumFileRelationDetail")
    @ApiOperation(value = "B8查询专辑文件关系详情", response = OkrResult.class)
    public OkrResult<BffQueryAlbumFileRelationDetailRespDto> queryAlbumFileRelationDetail(@RequestBody(required = false) @Validated BffQueryAlbumFileRelationDetailReqDto reqDTO) {
        return OkrResult.success(albumService.queryAlbumFileRelationDetail(reqDTO));
    }

//    /**
//     * B8新增文件关系
//     * gen by moon at 11/14/2024, 1:20:14 PM
//     */
//    @PostMapping("/oms/dataassets/album/loopAddAlbumFileRelation")
//    @ApiOperation(value = "B8新增文件关系", response = OkrResult.class)
//    public OkrResult<BffQueryAlbumFileRelationDetailRespDto> queryAlbumFileRelationDetail(@RequestBody(required=false) @Validated Map<String,Object> reqDTO){
//        albumService.addFileRelation(reqDTO);
//        return OkrResult.success(new BffQueryAlbumFileRelationDetailRespDto());
//    }

    /**
     * B8查询专辑文件关系列表
     * gen by moon at 11/14/2024, 1:20:16 PM
     */
    @PostMapping("/oms/dataassets/album/queryAlbumFileRelationList")
    @ApiOperation(value = "B8查询专辑文件关系列表", response = OkrResult.class)
    public OkrResult<BffQueryAlbumFileRelationListRespDto> queryAlbumFileRelationList(@RequestBody(required = false) @Validated BffQueryAlbumFileRelationListReqDto reqDTO) {
        return OkrResult.success(albumService.queryAlbumFileRelationList(reqDTO));
    }

    /**
     * B8查询回收站列表
     * gen by moon at 11/14/2024, 1:20:27 PM
     */
    @PostMapping("/oms/dataassets/album/queryRecycleList")
    @ApiOperation(value = "B8查询回收站列表", response = OkrResult.class)
    public OkrResult<BffQueryRecycleListRespDto> queryRecycleList(@RequestBody(required = false) @Validated BffQueryRecycleListReqDto reqDTO) {
        return OkrResult.success(albumService.queryRecycleList(reqDTO));
    }

    /**
     * B8移除专辑下文件
     * gen by moon at 11/14/2024, 1:20:31 PM
     */
    @PostMapping("/oms/dataassets/album/removeFileOfAlbum")
    @ApiOperation(value = "B8移除专辑下文件", response = OkrResult.class)
    public OkrResult<BffRemoveFileOfAlbumRespDto> removeFileOfAlbum(@RequestBody(required = false) @Validated BffRemoveFileOfAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.removeFileOfAlbum(reqDTO));
    }

    /**
     * B8删除专辑下文件
     * gen by moon at 11/14/2024, 1:20:34 PM
     */
    @PostMapping("/oms/dataassets/album/deleteFileOfAlbum")
    @ApiOperation(value = "B8删除专辑下文件", response = OkrResult.class)
    public OkrResult<BffDeleteFileOfAlbumRespDto> deleteFileOfAlbum(@RequestBody(required = false) @Validated BffDeleteFileOfAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.deleteFileOfAlbum(reqDTO));
    }

    /**
     * B8批量删专辑下文件-清空回收站
     * gen by moon at 11/14/2024, 1:20:37 PM
     */
    @PostMapping("/oms/dataassets/album/batchDeleteFileOfAlbum")
    @ApiOperation(value = "B8批量删专辑下文件-清空回收站", response = OkrResult.class)
    public OkrResult<BffBatchDeleteFileOfAlbumRespDto> batchDeleteFileOfAlbum(@RequestBody(required = false) @Validated BffBatchDeleteFileOfAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.batchDeleteFileOfAlbum(reqDTO));
    }

    /**
     * B8复制专辑和专辑下文件
     * gen by moon at 11/14/2024, 1:20:40 PM
     */
    @PostMapping("/oms/dataassets/album/copyAlbum")
    @ApiOperation(value = "B8复制专辑和专辑下文件", response = OkrResult.class)
    public OkrResult<BffCopyAlbumRespDto> copyAlbum(@RequestBody(required = false) @Validated BffCopyAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.copyAlbum(reqDTO));
    }

    /**
     * B2修改专辑存档操作
     * gen by moon at 11/15/2024, 4:56:52 PM
     */
    @PostMapping("/oms/dataassets/album/updateAlbumArchiveOper")
    @ApiOperation(value = "B2修改专辑存档操作", response = OkrResult.class)
    public OkrResult<BffUpdateAlbumArchiveOperRespDto> updateAlbumArchiveOper(@RequestBody(required = false) @Validated BffUpdateAlbumArchiveOperReqDto reqDTO) {
        return OkrResult.success(albumService.updateAlbumArchiveOper(reqDTO));
    }

    /**
     * B8新增专辑文件关系
     * gen by moon at 11/18/2024, 10:10:52 PM
     */
    @PostMapping("/oms/dataassets/album/loopAddAlbumFileRelation")
    @ApiOperation(value = "B8新增专辑文件关系", response = OkrResult.class)
    public OkrResult<BffLoopAddAlbumFileRelationRespDto> loopAddAlbumFileRelation(@RequestBody(required = false) @Validated BffLoopAddAlbumFileRelationReqDto reqDTO) {
        return OkrResult.success(albumService.loopAddAlbumFileRelation(reqDTO));
    }

    /**
     * B8移动文件到指定专辑
     * gen by moon at 3/30/2025, 3:39:39 PM
     */
    @PostMapping("/oms/dataassets/album/moveFilesToSpecAlbum")
    @ApiOperation(value = "B8移动文件到指定专辑", response = OkrResult.class)
    public OkrResult<BffMoveFilesToSpecAlbumRespDto> moveFilesToSpecAlbum(@RequestBody(required = false) @Validated BffMoveFilesToSpecAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.moveFilesToSpecAlbum(reqDTO));
    }

    /**
     * B8复制文件到指定专辑
     * gen by moon at 3/30/2025, 3:39:46 PM
     */
    @PostMapping("/oms/dataassets/album/copyFilesToSpecAlbum")
    @ApiOperation(value = "B8复制文件到指定专辑", response = OkrResult.class)
    public OkrResult<BffCopyFilesToSpecAlbumRespDto> copyFilesToSpecAlbum(@RequestBody(required = false) @Validated BffCopyFilesToSpecAlbumReqDto reqDTO) {
        return OkrResult.success(albumService.copyFilesToSpecAlbum(reqDTO));
    }

    /**
     * B8批量移除专辑下文件
     * gen by moon at 5/24/2025, 2:37:56 PM
     */
    @PostMapping("/oms/dataassets/album/batchRemoveAlbumFileRelation")
    @ApiOperation(value = "B8批量移除专辑下文件", response = OkrResult.class)
    public OkrResult<BffBatchRemoveAlbumFileRelationRespDto> batchRemoveAlbumFileRelation(@RequestBody(required = false) @Validated BffBatchRemoveAlbumFileRelationReqDto reqDTO) {
        return OkrResult.success(albumService.batchRemoveAlbumFileRelation(reqDTO));
    }

    /**
     * B8批量存档专辑下文件
     * gen by moon at 5/24/2025, 8:03:17 PM
     */
    @PostMapping("/oms/dataassets/album/batchArchiveAlbumFileRelation")
    @ApiOperation(value = "B8批量存档专辑下文件", response = OkrResult.class)
    public OkrResult<BffBatchArchiveAlbumFileRelationRespDto> batchArchiveAlbumFileRelation(@RequestBody(required = false) @Validated BffBatchArchiveAlbumFileRelationReqDto reqDTO) {
        return OkrResult.success(albumService.batchArchiveAlbumFileRelation(reqDTO));
    }

    /**
     * B8执行丢回收站
     * gen by moon at 5/27/2025, 1:27:54 PM
     */
    @PostMapping("/oms/dataassets/album/implementRecycle")
    @ApiOperation(value = "B8执行丢回收站", response = OkrResult.class)
    public OkrResult<BffImplementRecycleRespDto> implementRecycle(@RequestBody(required = false) @Validated BffImplementRecycleReqDto reqDTO) {
        return OkrResult.success(albumService.implementRecycle(reqDTO));
    }
}
